#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
    if (argc != 3) {
        cout << "Usage: " << argv[0] << "file x" << endl;
        return 0;
    }

    int x = atoi(argv[2]);
    ListNode *head = createLinkList(argv[1]);

    ListNode *h1 = partition(head, x);

    cout << "After partition:" << endl;
    printLinkList(h1);
    cout << endl;

    return 0;
}

    
